﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="SystemProcedureSecurity.aspx.cs" Inherits="VSM.SystemProcedureSecurity" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>&nbsp;System Grant Access Right</h2>
    <asp:HiddenField ID="hdnisUpdate" runat="server" />
    <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div style="margin-left: 5px; width: 99%;">
                <hr />
                <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                    <tr>
                        <td style="width: 100px">&nbsp;Modules:</td>
                        <td colspan="2">
                            <asp:DropDownList ID="ddl_Module" runat="server" AutoPostBack="True" 
                                OnSelectedIndexChanged="ddl_Module_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkReport" TextAlign="Left" Text="Report" runat="server" />
                        </td>
                    </tr>
                </table>
                <hr />
                <table style="width: 100%;" border="0">
                    <tr>
                        <td valign="top" style=" width: 20% ">
                            <asp:Panel ID="pnlUserGroup" Height="100%" Width="100%" runat="server">&nbsp;Group:
                                <asp:ListBox ID="lstUserGroup" Height="100%" Width="100%" runat="server" 
                                    onselectedindexchanged="lstUserGroup_SelectedIndexChanged"></asp:ListBox>
                            </asp:Panel>
                        </td>
                        <td style=" width: 80% ">
                            <asp:GridView ID="grvFunction" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                                BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                                HeaderStyle-Height="27px" CellSpacing="2" HeaderStyle-VerticalAlign="Middle"
                                OnRowDeleting="DeleteItem" OnRowDataBound="grvSearchResult_RowDataBound" AllowPaging="True"
                                OnPageIndexChanging="grvSearchResult_PageIndexChanging" PageSize="20">
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Function Name">
                                        <ItemStyle HorizontalAlign="Left" Width="60%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("Description") %>' BorderStyle="none"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="View">
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkView" runat="server" Checked='<%# Bind("Read_Access") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Add">
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkAdd" runat="server" Checked='<%# Bind("Add_Access") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Delete">
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkDelete" runat="server" Checked='<%# Bind("Delete_Access") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Modify">
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkModify" runat="server" Checked='<%# Bind("Modify_Access") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Print">
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkPrint" runat="server" Checked='<%# Bind("Print_Access") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False"
                                    Height="27px" VerticalAlign="Bottom" />
                                <EmptyDataTemplate>
                                    <table class="GridInner" style="width: 100%; border-color: White;" border="1" rules="all"
                                        cellspacing="2" cellpadding="2">
                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                            background-color: rgb(96, 149, 201);">
                                            <th style="width: 60%">
                                                <span>Function Name</span>
                                            </th>
                                            <th style="width: 8%">
                                                <span>View</span>
                                            </th>
                                            <th style="width: 8%">
                                                <span>Add</span>
                                            </th>
                                            <th style="width: 8%">
                                                <span>Delete</span>
                                            </th>
                                            <th style="width: 8%">
                                                <span>Modify</span>
                                            </th>
                                            <th style="width: 8%">
                                                <span>Print</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                <table width="100%" border="0">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 220px;">
                                        <asp:Button ID="btnUpdate" runat="server" Text="Update" 
                                            OnClick="btnUpdate_Click" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" BorderStyle="Solid" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
